package org.leaf.green.b2b

class MarketPriceActualDetailDetail {

    MarketPriceActualDetail marketPriceActualDetail         //
    String serialNumber                                     //行号
    Retailer retailer                                       //门店
    BigDecimal lowPrice                                     //最低价格
    BigDecimal highPrice                                    //最高价格

    static belongsTo = [marketPriceActualDetail : MarketPriceActualDetail]

    static constraints = {
        marketPriceActualDetail(nullable:false)
        serialNumber(nullable:false, blank:false, maxSize : 3, unique : 'marketPriceActualDetail')
        retailer(nullable:false)
        lowPrice(nullable:false, scale : 2)
        highPrice(nullable:false, scale : 2)
    }

    String toString(){
        return "${serialNumber}"
    }

    static mapping = {
        table 'B2B_MARKET_PRICE_ACTUAL_DETAIL_DETAIL'
    }

}
